package com.jzo2o.customer.controller.open;

import com.jzo2o.api.customer.dto.response.ServeProviderResDTO;
import com.jzo2o.common.constants.UserType;
import com.jzo2o.customer.model.domain.ServeProvider;
import com.jzo2o.customer.model.dto.request.InstitutionRegisterReqDTO;
import com.jzo2o.customer.model.dto.request.InstitutionResetPasswordReqDTO;
import com.jzo2o.customer.model.dto.request.LoginForCustomerReqDTO;
import com.jzo2o.customer.model.dto.request.LoginForWorkReqDTO;
import com.jzo2o.customer.model.dto.response.LoginResDTO;
import com.jzo2o.customer.service.ILoginService;
import com.jzo2o.customer.service.IServeProviderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author itcast
 */
@RestController("openInstitutionController")
@RequestMapping("/open/serve-provider")
@Api(tags = "白名单接口 - 客户登录相关接口")
public class InstitutionController {

    @Resource
    private ILoginService loginService;

    @Resource
    private IServeProviderService serveProviderService;


    /**
     * 注册接口
     */
    @PostMapping("institution/register")
    @ApiOperation("注册接口")
    public void register(@RequestBody InstitutionRegisterReqDTO institutionRegisterReqDTO) {

        System.out.println("注册接口");
        System.out.println(institutionRegisterReqDTO);
        //注册账号
        ServeProvider register = serveProviderService.register(institutionRegisterReqDTO);

    }

}
